package com.home;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BRReadLines {
    //枚举
    enum Color{
        RED,GREEN,BLUE;
    }

    public static void main(String[] args) throws IOException{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String str;
        System.out.println("enter lines of text");
        System.out.println("enter 'end' to quit");
        do{
            str=br.readLine();
            System.out.println(str);
        }while (!str.equals("end"));

        // Color.values()
        // Color.values()
        Color[] arr=Color.values();
        for(Color x:arr){
            System.out.println(x);
            System.out.println(x.ordinal());
        };
    }
}

class Color{
    public static final Color RED=new Color();
    public static final Color GREEN=new Color();
    public static final Color BLUE=new Color();
}